package com.xmu.prcs.dao;

import java.util.List;

import com.xmu.prcs.entity.User;

/**
 * 
 * @author frequent
 * @version 1.0,2010-3-20
 *
 */
public interface UserDao extends GenericDao<User>{

	public final String ID_USER = "idUser";
	public final String USER_NAME = "userName";
	public final String PASSWORD = "password";
	public final String EMAIL = "email";
	public final String PHOTO = "photo";
	public final String ADDRESS = "address";
	public final String SEX = "sex";
	public final String QQ_NUMBER = "qqNumber";
	public final String SIGNATURE = "signature";
	public final String BIRTHDAY = "birthday";
	public final String ZIP = "zip";
	public final String EGG = "egg";
	public final String FLOWER = "flower";
	public final String REGISTER_TIME = "registerTime";
	public final String STATUS = "status";
	
	/**
	 * 通过某个属性的条件查找用户
	 * @param property 属性名
	 * @param param 条件
	 * @return
	 */
	public List<User> findByProperty(String property, Object param);
	
	/**
	 * 得到指定结果数
	 * @param name
	 * @return
	 */
	public int countUsers(String name);
	
	/**
	 * 以分页效果得到用户列表
	 * @param begin
	 * @param size
	 * @param name
	 * @return
	 */
	public List<User> find4page(int begin, int size, String name);
}
